package com.ctosb.classviewer.clazz.cp;

import com.ctosb.classviewer.ClassReader;
import com.ctosb.classviewer.clazz.ClassFile;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class CONSTANT_Float_info extends Cp_info {

    private int bytes;

    @Override
    protected void doParse(ClassReader classReader) {
        bytes = classReader.readInt();
    }

    /**
     * 获取值
     * @Author alan
     * @Date 2020/12/13 10:08 下午
     * @param classFile
     * @return
     */
    public double getValue(ClassFile classFile) {
        return Float.intBitsToFloat(bytes);
    }
}
